package com.acme.bankapp.domain.bank;

import com.acme.bankapp.account.NotEnoughFundsException;
import com.acme.bankapp.account.OverDraftLimitExceededException;

/**
 * @author Andrey Alekov
 * Bank account interface.
 */
public interface Account {
	/**
	 * Return account identification number.
	 * @return Actual account balance.
	 */
	public long getAccountId();

	/**
	 * Set account identification number.
	 * @return Actual account balance.
	 */
	public void setAccountId(long accountId);

	/*
	 * Return actual account balance.
	 * @return Actual account balance.
	 */
	public double getBalance();
	
	/*
	 * Return integer value of account balance.
	 */
	public long getDecimalValue();
	
	/*
	 * Return integer value of account balance.
	 */
	public Account getOverdraftAccount();
	
	/*
	 * Deposit account to @param value.
	 * @param amount
	 * @return True if operation successful, else return False.
	 */
	public void deposit(double amount);
	
	/**
	 * Method check type overdraft account
	 * @return True if account with overdraft
	 */
	public boolean hasOverdraft();
	/*
	 * Withdraw account to @param value.
	 * @param amount
	 * @return True if operation successful, else return False.
	 */
	public void withdraw(double amount) throws OverDraftLimitExceededException, NotEnoughFundsException;
	
	/* 
	 * Public toString class method.
	 */
	public String toString();
}